Computer Science Notes: Abstract Paradigms & C Comparison
Compiled vs. Interpreted Execution Models
Python embodies a fundamental paradigm shift in software engineering. Rather than obsessing over hardware alignment and memory allocation, Python prioritizes developer velocity, code readability, and rapid prototyping.
- Compiled Languages (C): The source code is parsed and translated entirely by a compiler into target-specific native machine code before execution.
- Interpreted Languages (Python): The
CPythonruntime compiles source scripts into intermediary Bytecode (.pyc), which is subsequently evaluated line-by-line within a virtual machine loop at runtime. This grants seamless cross-platform portability.
Dynamic vs. Static Typing Mechanics
- Static Typing (C): Variable declarations require strict explicit type binding (
int, char, float), which remains immutable throughout the variable's scope. - Dynamic Typing (Python): Types are fundamentally bound to the underlying object instances rather than variable names, allowing identifiers to re-bind to entirely different types at runtime.
===================================================================================
TYPING PARADIGM COMPARISON
===================================================================================
[ C: int x = 10; ] ββ> Fixed 4 bytes on stack, strict type validation
[ Python: x = 10 ] ββ> Dynamic Object Reference, mutable at runtime
===================================================================================